﻿/*
 * Copyright(C), 2010-2023, CSDN @ whik1194
 * Time       : 2023年4月9日
 * Author     : https://blog.csdn.net/whik1194
 * GitHub     : https://github.com/whik/xqueue
 */
#include <stdio.h>
#include <stdlib.h>

#include "xqueue.h"

int main(int argc, char *argv[])
{
    queue_t queue;
    qdata_t data;

    queue_reset(&queue);
    queue_write(&queue, 1);
    queue_write(&queue, 2);
    queue_write(&queue, 3);
    queue_read(&queue, &data);
    queue_read(&queue, &data);
    queue_write(&queue, 4);
    queue_write(&queue, 5);
    queue_write(&queue, 6);
    queue_write(&queue, 7);
    queue_read(&queue, &data);
    queue_read(&queue, &data);
    queue_read(&queue, &data);
    queue_write(&queue, 8);
    queue_write(&queue, 9);
    queue_write(&queue, 10);
    queue_read(&queue, &data);

    system("pause");
    return 0;
}
